import request from '@/utils/request'

export const EXPORT_URL = '/system/new/exportteam'
export const EXPORT_TEAM_STATION_URL = '/system/new/exportrelation'
export const EXPORT_TEAM_USER_URL = '/system/new/exportuserteam'

// 查询列表
export function listTeam(query) {
  return request({
    url: '/system/new/showteam',
    method: 'post',
    params: query
  })
}

// 查询详情
export function getTeam(id) {
  return request({
    url: '/system/edit/getteam?id=' + id,
    method: 'get'
  })
}

// 新增
export function addTeam(data) {
  return request({
    url: '/system/new/saveteam',
    method: 'post',
    data: data
  })
}

// 修改
export function updateTeam(data) {
  return request({
    url: '/system/new/editteam',
    method: 'post',
    data: data
  })
}

// 删除
export function delTeam(ids) {
  return request({
    url: '/system/new/deltream/' + ids,
    method: 'DELETE',
  })
}


// 查询场站设置
export function getTeamStation(id) {
  return request({
    url: '/system/edit/getrelation?id=' + id,
    method: 'get'
  })
}

// 查询团队场站列表
export function listTeamStation(query) {
  return request({
    url: '/system/new/showrelation',
    method: 'post',
    params: query
  })
}

// 新增团队场站
export function addTeamStation(data) {
  return request({
    url: '/system/new/saverelation',
    method: 'post',
    data: data
  })
}

// 修改团队场站
export function updateTeamStation(data) {
  return request({
    url: '/system/new/editrelation',
    method: 'post',
    data: data
  })
}

// 删除团队场站
export function delTeamStation() {
  return request({
    url: '/system/new/delrelation/' + ids,
    method: 'DELETE',
  })
}


// 查询关联人员列表
export function listTeamUser(query) {
  return request({
    url: '/system/new/showuserteam',
    method: 'post',
    params: query
  })
}

// 新增团队关联人员
export function addTeamUser(data) {
  return request({
    url: '/system/new/saveuserteam',
    method: 'post',
    data: data
  })
}

// 删除团队关联人员
export function delTeamUser() {
  return request({
    url: '/system/new/deluserteam/' + ids,
    method: 'DELETE',
  })
}
